using System;
using System.Collections.Generic;
using System.Text;

namespace MedicalSystem.SmartReport.Mobile
{
   public class ComboBoxElement
    {

       public ComboBoxElement(
                               string rowFilter, 
                               string dataMember, 
                               string displayMember,
                               string valueMember,
                               string name
                              )
       {
           this._dataMember = dataMember;
           this._displayMember = displayMember;
           this._rowFilter = rowFilter;
           this._valueMember = valueMember;
           this._name = name;
           _comboBoxItems.Clear();
       }

       private string _rowFilter = string.Empty;
       private string _dataMember = string.Empty;
       private string _displayMember = string.Empty;
       private string _valueMember = string.Empty;
       private string _name = string.Empty;

       private List<ComboxItem> _comboBoxItems = new List<ComboxItem>();

       public string RowFilter
       {
           get { return _rowFilter; }
           
       }
       public string DataMember
       {
           get { return _dataMember; }
          
       }
       public string ItemValueMember
       {
           get { return _valueMember; }
          
       }
       public string ItemDisplayMember
       {
           get { return _displayMember; }
          
       }
       public string Name
       {
           get { return _name; }
          
       }

       public List<ComboxItem> Items
       {
           get { return _comboBoxItems; }
       }
       

       public void AddComboBoxItem(string displayText, string data)
       {
           _comboBoxItems.Add(new ComboxItem(displayText, data));
       }
    }

    public class ComboxItem
    {
        public ComboxItem(string displayText, string data)
        {
            this._displayText = displayText;
            this._data = data;
        }

        private string _displayText=string.Empty;
        private string _data=null;

        public string DisplayText
        {
            get { return _displayText;}
            set { _displayText=value;}
        }
        public string Data
        {
            get { return _data;}
            set { _data=value;}
        }
        //public override string ToString()
        //{
        //    return _displayText;
        //}
    }
}
